﻿using System;
using System.Text;

class ReverseString
{
    static void Main()
    {
        //Exercise 2.
        //Write a program that reads a string, reverses it and prints the result at the console.
        //Example: "sample" -> "elpmas".

        Console.Write("Enter a string: ");
        string text = Console.ReadLine();
        
        StringBuilder reversedText = new StringBuilder();

        for (int i = text.Length - 1; i >= 0; i--)
        {
            reversedText.Append(text[i]);
        }

        Console.WriteLine(reversedText);
    }
}

